package com.zoe.onelink.business.endpoint;

import com.zoe.onelink.business.service.ParamService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2023</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: ruansheng
 * @date: 2023-02-06
 */
@RequiredArgsConstructor
@Slf4j
@RestControllerEndpoint(id = "onelink")
public class OnelinkBizEndpoint {

    private final ParamService paramService;

    @GetMapping("/biz/param/clearBizLocalCaches")
    public String clearBizLocalCaches() {
        log.info("[OneLinkEndpoint] 清空本地缓存");
        this.paramService.clearLocalCache();
        return "本地缓存清理成功";
    }

}
